import Vue from 'vue'
import Vuex from 'vuex'
//用vuex插件
Vue.use(Vuex)
import home from './home/home'
import search from './search/search'
import detail from './detail'
import shopcart from './shopcart/shopcart'
import user from './user'
import trade from './trade'
// console.log(user)
export default new Vuex.Store({
    modules: {
        //这里用了对象的简写形式：key和value一致 ，可以省略其中一个
        home,
        search,
        detail,
        shopcart,
        user,
        trade
    }
})